<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.lanqiao.guimei.vo.Product" %><%--
  Created by IntelliJ IDEA.
  User: shen
  Date: 2019/8/17
  Time: 17:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<form class="form-horizontal" action="../product/select.do" method="post" id="updateProduct">
    <c:forEach var="prodno" items="${requestScope.prodno}">
    <input type="hidden" name="prodNo" value="${prodno.prodNo}" />
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">更新</h4>
    </div>

<div class="modal-body">
        <div class="form-group">
            <label for="prodNo" class="col-sm-2 control-label">产品编号</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="prodNo" disabled value="${prodno.prodNo}" />
            </div>
        </div>
        <div class="form-group">
            <label for="inputprodName" class="col-sm-2 control-label">商品名称</label>
            <div class="col-sm-10">
                <input type="text" name="prodName" class="form-control" id="inputprodName" value="${prodno.prodName}"/>
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="ctgrName" class="form-control" value="${prodno.category.ctgrName}"/>
            <label for="ctgrId" class="col-sm-2 control-label">商品分类</label>
            <div class="col-sm-10">
                <input type="text" name="ctgrName" class="form-control" id="ctgrId"  value="${prodno.category.ctgrName}" disabled/>
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="venName" class="form-control"  value="${prodno.vendor.venName}" />

            <label for="inputvenId" class="col-sm-2 control-label">供应商</label>
            <div class="col-sm-10">
                <input type="text" name="venName" class="form-control" id="inputvenId" value="${prodno.vendor.venName}" disabled/>
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="quantity" class="form-control" value="${prodno.stock.quantity}" />
            <label for="stkId" class="col-sm-2 control-label">库存</label>
            <div class="col-sm-10">
                <input type="text" name="quantity" class="form-control" id="stkId" value="${prodno.stock.quantity}" disabled/>
            </div>
        </div>

        <div class="form-group">
            <label for="inputprice" class="col-sm-2 control-label">原价格</label>
            <div class="col-sm-10">
                <input type="text" name="price" class="form-control" id="inputprice" value="${prodno.price}" required/>
            </div>
        </div>
        <div class="form-group">
            <label for="inputtype" class="col-sm-2 control-label">型号</label>
            <div class="col-sm-10">
                <input type="text" name="type" class="form-control" id="inputtype" value="${prodno.type}"/>
            </div>
        </div>
        <div class="form-group">
            <label for="descr" class="col-sm-2 control-label">描述</label>
            <div class="col-sm-10">
                <input type="text" name="descr" class="form-control" id="descr" value="${prodno.descr}"/>
            </div>
        </div>
        <div class="form-group">
            <label for="inputimage" class="col-sm-2 control-label">商品图片</label>
            <div class="col-sm-10">
                <input type="text" name="image" class="form-control" id="inputimage" value="${prodno.image}"/>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" onclick="updateSave('${prodno.prodNo}')">保存</button>
    </div>
</c:forEach>

</form>

